package com.yuke.cloud.service.uac.service;

import com.yuke.cloud.common.base.dto.LoginAuthDto;
import com.yuke.cloud.service.uac.dto.RoleBindPermissionDto;
import com.yuke.cloud.service.uac.entity.AccRolePermission;
import com.yuke.cloud.common.core.support.IService;
import com.yuke.cloud.service.uac.vo.BindAuthVo;

import java.util.List;


/**
 * Created by wg on 2018/11/02.
 */
public interface AccRolePermissionService extends IService<AccRolePermission> {

    int deleteByPermissionId(Long permissionId);
    int batchDeleteByPermissionIdList(List<Long> deleteIdList);
    /**
     * Delete by role id.
     *
     * @param roleId the role id
     */
    void deleteByRoleId(Long roleId);

    /**
     * Delete by role id list int.
     *
     * @param roleIdList the role id list
     *
     * @return the int
     */
    int deleteByRoleIdList(List<Long> roleIdList);

    /**
     * Gets auth tree by role id.
     *
     * @param roleId the role id
     *
     * @return the auth tree by role id
     */
    BindAuthVo getPermissionTreeByRoleId(Long roleId);

    /**
     * Gets checked auth list.
     *
     * @param roleId the role id
     *
     * @return the checked auth list
     */
    List<Long> getCheckedPermissionList(Long roleId);

    /**
     * Grant auth 4 role int.
     *
     * @param grantAuthRole the grant auth role
     */
    void bindPermission(RoleBindPermissionDto grantAuthRole, LoginAuthDto loginAuthDto);

    /**
     * List by role id list.
     *
     * @param roleId the role id
     *
     * @return the list
     */
    List<AccRolePermission> listByRoleId(Long roleId);

    List<String> getPermissionUrlListByRoleIds(List<Long> roleIdList);
}
